<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class exceptionHandler{
    public function addLog($e,$app){
    //initialize applog
    $applog = new Application_Model_DbTable_Applog();
    //get error detail
    $app = APPLICATION_PATH .'/'.$app;
    $file = $e->getFile();
    $line = $e->getLine();
    $exception=get_class($e);
    $exception_message=$e->getMessage();           
    //insert error details
    $applog->insertLog($file, $exception, $exception_message,$app."-".$line);
    }
}

?>
